home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / RMDIR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  280 b   |  17 lines

  1. /* rmdir.c function from page 381 of turbo c bible */
  2. #include<stdio.h>
  3. #include<dir.h>
  4. main(int argc, char **argv)
  5. {
  6.     if(argc < 2)
  7.     {
  8.         printf("Usage: %s <pathname>\n", argv[0]);
  9.     }
  10.     else
  11.     {
  12.         if(rmdir(argv[1]) != 0)
  13.         {
  14.             perror("error in \"rmdir\"");
  15.         }
  16.     }
  17. }